﻿<%@ Page Language="C#" MasterPageFile="~/Default.Master" AutoEventWireup="true" CodeBehind="BookIntro.aspx.cs" Inherits="com.dz.web.BookIntro" Title="无标题页" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphContent" runat="server">
<link rel="STYLESHEET" type="text/css" href="/style/bookIntro.css" />



<DIV class="wrap clear">
<DIV class=profile_left>



<DIV class="topinfo kxbybox" style="position:relative;"><B class=l1></B><B class="l2 b2"></B><B 
class="l3 b2"></B><B class="l4 b2"></B>
<DIV class=content>
<DL class=left>
  <DD class=img><a href="/<%=m_book_id %>.aspx" height="50"><img src=" <%=m_icon_path %>" /></a></DD>
  
  <DD style="text-align:center;"><asp:Label ID="lblBookName" runat="server"></asp:Label></DD>
  <DD class=borb>类别：<asp:Label ID="lblSubCategoryName" runat="server"></asp:Label> </DD>
  <DD class=borb>作者：<asp:Label ID="lblAuthor" runat="server"></asp:Label></DD>
  <DD class=borb>字数：<asp:Label ID="lblWordsCount" runat="server"></asp:Label></DD>
  <DD class=borb>更新：<asp:Label ID="lblLastUpdateTime" runat="server"></asp:Label></DD>
</DL>
<DIV style="OVERFLOW: hidden" class="topright topright0804">
<DIV id=yekaTab12 class="tag03 clear">
<UL>
  <LI><SPAN class=active>作品简介</SPAN> </LI>
  </UL>
</DIV>
<div style=" margin-top:5px; margin-left:10px; height:150px; margin-bottom:10px; ">
<asp:Label ID="lblDescription" runat="server"></asp:Label>
</div>
<div id="box4">
      <p style="margin-left:10px;">
      最新更新章节：<asp:Label ID="lblLastUpdateChapter" runat="server"></asp:Label>
      </p>
<br />
          <div style="float:right;"><span><a href="#" onclick="javascript:AddUserBook('bookcase');return false;">加入书架</a></span><span><a href="#" onclick="javascript:AddUserBook('bookcommend');return false;">推荐此书</a></span><span id="bt_2"><a href="#" onclick="javascript:UpdateBook();return false;">请求更新</a></span> <span id="bt_3"><a href="/chapterList/<%=m_book_id %>.aspx" target=_blank><font size="3">开始阅读</font></a></span> </div></DIV>
</DIV></DIV><B class="l4 b3"></B><B 
class="l3 b3"></B><B class="l2 b3"></B><B class=l1></B>




<DIV style="margin-top:20px;">
<label id="lblreview"></label>
</DIV>
<DIV style="margin-top:20px; BORDER: #f5d3c6 1px solid;">
<div class="tit3"><span class="f12 fw_n">发表评论</span></div>
<div id="yekacont12" class="bd"><div class="clear"><table><tbody>

<tr>
<td colspan="2" style="width:680px;"><textarea id="post_content" name="content" cols="150" onclick="ClickPost()" rows="5" style="width:680px; margin:0px; padding:0px; float:left;" ></textarea></td>
</tr>
<tr   style="margin-bottom:10px; margin-top:10px; width:680px;" >
<td id="trUser" style="width:500px; display:none; ">&nbsp;&nbsp;用户名：&nbsp;<input type="text" id="userName" style="width:70px;" />&nbsp;&nbsp;密码：<input type="password" id="pwd"  style="width:70px;"  />&nbsp;&nbsp;<a href="/User/Register.aspx?returnUrl=/<%=m_book_id %>.aspx" target="_blank" class="color_E0112"> 注册</a></td><td style=" text-align:right;">
验证码：&nbsp;<input type="text" id="txtVerfyCode" style="width:50px; height:25px; vertical-align:top;" />&nbsp;&nbsp;<img id="imgVerify" style="cursor:hand;" src="/VerifyCode.aspx" alt="看不清？点击更换" onclick="this.src=this.src+'?'" />&nbsp;&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;
</td>
</tr>
<tr>

<td colspan="2" style="width:680px; text-align:right;"><input type="button" onclick="DoPost()" class="btn" value="确定提交" style="float:right; width:90px; margin-bottom:10px;" /> </td>

</tr></tbody></table></div></div>

</DIV>

</DIV>



</DIV>



<DIV class=profile_right>
 <DIV class=hr10></DIV>
<DIV class="phb">
<DIV class=left>
<DIV class=hd>
<H3><%=m_book_category_name%>—点击排行</H3></DIV>

<asp:Label ID="lblVipClick" runat="server"></asp:Label>
</DIV>
                         <DIV class=hr10></DIV>
<DIV class=left>
<DIV class=hd>
<H3><%=m_book_category_name%>—最新更新</H3></DIV>

<asp:Label ID="lblVipUpdateTime" runat="server"></asp:Label>
</DIV>
                         <DIV class=hr10></DIV>
<DIV class=left>
<DIV class=hd>
<H3><%=m_book_category_name%>—最新入库</H3></DIV>

<asp:Label ID="lblGetTime" runat="server"></asp:Label>
</DIV>
                          <DIV class=hr10></DIV>
</DIV>
</DIV>

</DIV>

<script>
function AddUserBook(bookType)
{
    var isLogin=CheckUserLogin();

    if(isLogin==false)
    {
        alert("您还没有登录，请先登录!");
        $("txtUserName").focus();
        return false;
    }
    MyAjax.ExcuteScript(bookType,bookId,ShowAddUserBookBack);
}
function ShowAddUserBookBack(result)
{
    alert(result.value);
}
function UpdateBook()
{
    var bookId="<%=m_book_id %>";
     MyAjax.ExcuteScript("updatebook",bookId,ShowUpdateBack);
}
function ShowUpdateBack(result)
{
    if(result.value.indexOf("成功")>-1)
    {
        alert("更新请求已经提交,我们会尽快更新本书章节,敬请关注!");
        
    }
    else
    {
        alert(result.value);
    }
}
function ClickPost()
{
    if(GetCookie("ll")==null)
    {
         $("trUser").style.display="";
    }
    $("imgVerify").src="/VerifyCode.aspx?rd+"+Math.random();
    return false;
}
var bookId="<%=m_book_id %>";
var c_totalPageSize=1;
var c_pageIndex=1;
var pageSize=15;
function GoPage(pageIndex)
{
    c_pageIndex=pageIndex;
    MyAjax.GetDataList(pageIndex,pageSize,c_totalPageSize,"Review",bookId, ShowCallBack);
}
function ShowCallBack(result)
{
    eval(result.value);
    var t="";
    if(typeof(totalCount)!="undefined" && totalCount!=null)
    {
        if(totalCount!=0)
        {
            c_totalPageSize=totalCount;
        }
    }

    if(typeof(list)!="undefined" && list!=null)
    {
        for(var index=0;index<list.length;index++)
        {
            // t=t+"<div class=\"tit3\"><span class=\"f12 fw_n\">"+list[index][0]+"&nbsp;&nbsp;&nbsp;&nbsp;"+list[index][1]+"</span></div>";
            t=t+"<div class=\"tit3\"><span class=\"f12 fw_n\">"+(parseInt( (c_pageIndex-1)*pageSize)+index+1)+"&nbsp;&nbsp;楼</span></div>"
            t=t+"<div  class=\"cc\">"+list[index][2]+"</div>";
        }
 
        document.getElementById("lblreview").innerHTML=t+t_pager;
    }
}
GoPage(1);
function DoPost()
{
    var c=$("post_content");
    var v=$("txtVerfyCode");
    var u=$("userName");
    var p=$("pwd");
    if(c.value=="")
    {
        alert("内容不能为空!");
        c.focus();
        return false;
    }
    if(v.value=="")
    {
        alert("请输入验证码!");
        v.focus();
        return false;
    }
    MyAjax.ExcuteScript("review",bookId+"$"+c.value+"$"+v.value+"$"+u.value+"$"+p.value,ShowPostBack);
}
function ShowPostBack(result)
{
    alert(result.value);
    if(result.value.indexOf("成功")>-1)
    {
        if(GetCookie("ll")!=null)
        {
             $("trUser").style.display="none";
        }
        GoPage(1);
    }
}
</script>
</asp:Content>
